goal=[200 -100 -50];
weight=[200 -100 -50];
x0=[50 50];
A=[2 1;-1 -1;-1 0];
b=[200 -100 -50];
lb=zeros(2,1);
[x,fval,attainfactor,exitflag]=fgoalattain(@Ex1016,x0,goal,weight,A,b,[],[],lb,[])
Optimization terminated successfully:
 Search direction less than 2*options.TolX and
  maximum constraint violation is less than options.TolCon
Active Constraints:
     4
     7
